#pragma once
#include <vector>
#include <iostream>

typedef char Action;

class Plan
{
public:
	template <class iterator>
  Plan(iterator actionsBegin, iterator actionsEnd)
		: _actions(actionsBegin, actionsEnd)
	{
	}

  template <class iterator>
  Plan(iterator actionsBegin, iterator actionsEnd, int nbPoints)
    : _actions(actionsBegin, actionsEnd)
  {
    _nbPoints = nbPoints;
  }

  int getPoints()
  {
    return _nbPoints;
  }

	friend std::ostream& operator<<(std::ostream& out, const Plan& plan)
	{
		for (auto it = plan._actions.begin(); it != plan._actions.end(); ++it)
		{
			out << *it;
		}
    out << std::endl;
    out << "Nombre de points : " << plan._nbPoints << std::endl;
		return out;
	}

private:
	std::vector<Action> _actions;
  int _nbPoints;
};